package com.passioneffect.widgets {
	import flash.display.DisplayObject;
	
	import gs.TweenMax;		

	/**
	 * @author Passion Effect
	 */
	public class Blur {
		private var _time : Number = 1;
		private var _target : DisplayObject;
		private var _blurX:Number=5;
		private var _blurY:Number=5;
		
		public function Blur(mc : DisplayObject,time : Number = 1,blurX:Number=5,blurY:Number=5) {
			this._target=mc;
			this._blurX=blurX;
			this._blurY=blurY;
			this._time=time;
		}

		public function open() : void {
			TweenMax.to(_target, _time, {blurFilter:{blurX:_blurX,blurY:_blurY}});
		}

		public function close() : void {
			TweenMax.to(_target,_time,{blurFilter:{blurX:0,blurY:0}});
		}
	}
}
